/**
 * 
 */
package com.zhaoyan.cms.service;

import java.util.List;

import com.github.pagehelper.PageInfo;
import com.zhaoyan.cms.pojo.Article;
import com.zhaoyan.cms.pojo.Category;
import com.zhaoyan.cms.pojo.Channel;
import com.zhaoyan.cms.pojo.Comment;
import com.zhaoyan.cms.pojo.Vote;
import com.zhaoyan.cms.pojo.vo.ArticleVo;
import com.zhaoyan.cms.pojo.vo.VoteVo;

/**
 * @author zhaoyan
 *
 * 2020年1月19日
 */
public interface ArticleService {

	/**
	 * @param pageNum
	 * @return
	 */
	PageInfo<Article> hotList(Integer pageNum);

	/**
	 * @param i
	 * @return
	 */
	List<Article> articleListByCreated(int i);

	/**
	 * @return
	 */
	List<Channel> findChannels();

	/**
	 * @param categoryId
	 * @param channelId
	 * @param pageNum
	 * @return
	 */
	PageInfo<Article> articleList(Integer categoryId, Integer channelId, Integer pageNum);

	/**
	 * @param channelId
	 * @return
	 */
	List<Category> findCategoryList(Integer channelId);

	/**
	 * @param id
	 * @return
	 */
	PageInfo<Article> findArticles(Integer id,Integer pageNum);

	/**
	 * @param article
	 * @return
	 */
	Integer addArticle(Article article);

	/**
	 * @param id
	 * @return
	 */
	Integer delOne(Integer id);

	/**
	 * @param id
	 * @return
	 */
	Article findArticle(Integer id);

	/**
	 * @param article
	 * @return
	 */
	Integer updateOne(Article article);

	/**
	 * @param vo
	 * @param pageNum
	 * @return
	 */
	PageInfo<Article> findArticleList(ArticleVo vo, Integer pageNum);

	/**
	 * @param id
	 * @param statusId
	 * @return
	 */
	Integer setStatus(Integer id, Integer statusId);

	/**
	 * @param id
	 * @param statusId
	 * @return
	 */
	Integer setHot(Integer id, Integer statusId);

	/**
	 * @param userId
	 * @param lockedId
	 * @return
	 */
	Integer setUser(Integer userId, Integer lockedId);

	/**
	 * @param pageNum
	 * @param articeId
	 * @return
	 */
	PageInfo<Comment> findComment(Integer pageNum, Integer articeId);

	/**
	 * @param comment
	 * @return
	 */
	Integer addComment(Comment comment);


	/**
	 * @param vote
	 * @return
	 */
	Integer addVote(Vote vote);

}
